<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStatusesTable extends Migration
{
    public function up()
    {
        Schema::create('shared', function (Blueprint $table) {
            $table->increments('id');
            $table->text('content')->comment('内容');
            $table->integer('user_id')->index();
            $table->boolean('status')->default(true)->index();
            $table->index(['created_at']);
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('shared');
    }
}
